import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    children: [{
      path: '',
      name: 'homepage',
      component: () => import('../views/Homepage.vue'),
    },
    {
      path: 'vpi',
      name: 'vpi',
      component: () => import('../views/Vpi.vue'),
    },
    {
      path: 'detail',
      name: 'detail',
      component: () => import('../views/Detail.vue'),
    },
    {
      path: 'marketdetail',
      name: 'marketdetail',
      component: () => import('../views/MarketDetail.vue')
    },
    {
        path: 'search',
        name: 'search',
        component:()=>import('../views/Search.vue'),
        },
      {
      path: 'market',
      name: 'market',
      component: () => import('../views/Market.vue')
      },
      {
        path: 'information',
        name: 'information',
        component:()=>import('../views/Information.vue'),
      },
      {
        path: 'belletion',
        name: 'belletion',
        component:()=>import('../views/Bulletin.vue'),
        },
      {
        path: 'shop',
        name: 'shop',
        component:()=>import('../views/Shop.vue'),
        children:[
          {
            path: '',
            name:'usercoll',
            component:()=>import('../views/UserCollection.vue'),
          },
          {
            path:'showcoll/:cname',
            name:'showcoll',
            component:()=>import('../views/Showcoll.vue'),
          },
          {
            path: 'sale',
            name: 'sale',
            component: () => import('../views/Sale.vue'),
          },
      ]
    },



    ]
  },
  {
    path: '/nav',
    name: 'Nav',
    component: () => import('../views/Home.vue'),

  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
